﻿namespace EOrm
{
    /// <summary>
    /// 连接字符串的抽象类
    /// </summary>
    public abstract class ConStr
    {
        /// <summary>
        /// 数据库连接字符串
        /// </summary>
        public string ConnectionString
        {
            private set;
            get;
        } = "";

        /// <summary>
        /// 设置数据库连接字符串
        /// </summary>
        /// <param name="conStr">数据库连接字符串</param>
        protected void SetConStr(string conStr)
        {
            ConnectionString = conStr;
        }
        /// <summary>
        /// 数据库是否是为嵌入式数据库, 真或假
        /// </summary>
        protected string DbEmbed { get; set; } = "";

        /// <summary>
        /// 数据库主机, Ip地址
        /// </summary>
        protected string DbHost { get; set; } = "";

        /// <summary>
        /// 数据库实例
        /// </summary>
        protected string DbInstance { get; set; } = "";

        /// <summary>
        /// 数据库名称
        /// </summary>
        protected string DbName { get; set; } = "";

        /// <summary>
        /// 数据库密码
        /// </summary>
        protected string DbPassword { get; set; } = "";

        /// <summary>
        /// 数据库串口号
        /// </summary>
        protected string DbPort { get; set; } = "";

        /// <summary>
        /// 数据库文件所在位置
        /// </summary>
        protected string DbPosition { get; set; } = "";

        ///// <summary>
        ///// 数据库类型
        ///// </summary>
        //string DbStyle { get; set; }

        /// <summary>
        /// 数据库是否直接采用系统认证授权
        /// </summary>
        protected string DbTrusted { get; set; } = "";

        /// <summary>
        /// 数据库用户名
        /// </summary>
        protected string DbUser { get; set; } = "";

        ///// <summary>
        ///// 连接字符串的名称
        ///// </summary>
        //string ConnectionName { get; set; }
    }
}
